package com.zp.self.module.level_5_设计模式.结构型模式.Ⅱ_适配器模式.对象适配;

import org.junit.Test;

/**
 * @author ：by Zeng Peng
 * @date ：Created 2022/6/28 21:29
 * @description ：
 */
public class Client {
    @Test
    public void test(){
        //创建计算机对象
        Computer computer = new Computer();
        //读取SD卡中的数据
        String msg = computer.readSD(new SDCardImpl());
        System.out.println(msg);

        System.out.println("----------------------------");
        String msg2 = computer.readSD(new SDAdapterTF(new TFCardImpl()));
        System.out.println(msg2);
    }
}
